var t = require;
var e = module;
var o = exports;
var n =
        (this && this.__extends) ||
        (function () {
            var t = function (e, o) {
                return (t =
                    Object.setPrototypeOf ||
                    ({__proto__: []} instanceof Array &&
                        function (t, e) {
                            t.__proto__ = e;
                        }) ||
                    function (t, e) {
                        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
                    })(e, o);
            };
            return function (e, o) {
                function n() {
                    this.constructor = e;
                }
                t(e, o), (e.prototype = null === o ? Object.create(o) : ((n.prototype = o.prototype), new n()));
            };
        })(),
    r =
        (this && this.__decorate) ||
        function (t, e, o, n) {
            var r,
                a = arguments.length,
                i = a < 3 ? e : null === n ? (n = Object.getOwnPropertyDescriptor(e, o)) : n;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) i = Reflect.decorate(t, e, o, n);
            else
                for (var s = t.length - 1; s >= 0; s--)
                    (r = t[s]) && (i = (a < 3 ? r(i) : a > 3 ? r(e, o, i) : r(e, o)) || i);
            return a > 3 && i && Object.defineProperty(e, o, i), i;
        };
Object.defineProperty(o, "__esModule", {value: !0}), (o.DayGem = void 0);
var a = t("Const"),
    i = t("LoadImgs"),
    s = t("Platforms"),
    c = t("Popup"),
    l = t("Sounds"),
    u = cc._decorator,
    p = u.ccclass,
    f =
        (u.property,
        (function (t) {
            function e() {
                return (null !== t && t.apply(this, arguments)) || this;
            }
            return (
                n(e, t),
                (e.prototype.init = function () {
                    var t = this;
                    if (s.default.platformCtrl.显示客服签到) {
                        var e = this.node.getChildByName("container");
                        (this.group1 = e.getChildByName("group1")),
                            (this.group2 = e.getChildByName("group2")),
                            (this.group3 = e.getChildByName("group3")),
                            (this.btn = this.group1.getChildByName("btn")),
                            this.btn.on(cc.Node.EventType.TOUCH_END, function () {
                                l.Sounds.playFX("点击"), t.hide(), s.default.platformCtrl.openDayGem();
                            }),
                            i.LoadImgs.load(a.default.客服签到领钻石按钮, !0, function (e) {
                                t.btn.getComponent(cc.Sprite).spriteFrame =
                                    t.group2.getChildByName("img2").getComponent(cc.Sprite).spriteFrame =
                                    t.group3.getChildByName("img3").getComponent(cc.Sprite).spriteFrame =
                                        e;
                            }),
                            (this.group3.getChildByName("chName").getComponent(cc.Label).string = a.default.chName),
                            (this.close = e.getChildByName("close")),
                            this.close.on(cc.Node.EventType.TOUCH_END, function () {
                                l.Sounds.playFX("点击"), t.hide();
                            }),
                            a.default.wid0 > a.default.hei0 ||
                                ((e.width = 640),
                                (e.height = 760),
                                (e.y = -300),
                                (this.group1.x = -110),
                                (this.group1.y = 500),
                                (this.group2.x = 110),
                                (this.group2.y = 500),
                                (this.group3.x = 0),
                                (this.group3.y = 230));
                    }
                }),
                (e.prototype.show = function () {
                    t.prototype.show.call(this);
                }),
                (e.prototype.showComplete = function () {
                    t.prototype.showComplete.call(this);
                }),
                (e.prototype.hide = function () {
                    t.prototype.hide.call(this);
                }),
                (e.prototype.hideComplete = function () {
                    t.prototype.hideComplete.call(this);
                }),
                (e = r([p], e))
            );
        })(c.Popup));
o.DayGem = f;
